Public: Concord Software Projects : Deploying Java applications onto local computers in schools
This page last changed on Oct 30, 2008 by sfentress.
Concord Consortium currently uses Java Web Start to deploy its Java applications to students in all its projects. Web Start makes it easy for end users to download the compiled Java code and run an application, and to update their code as new releases are made available. By default, Web Start stores all the downloaded code into a folder in the user's home folder, e.g. /Users/<username>/Library/Caches/Java. This default makes it easy for users with limited administrative rights to install a Java application and use it. However, this default has several major drawbacks that may be a problem in schools:
To solve these problems, one alternative is to change the Web Start settings so that the files are saved and read from a folder on the local computer. This requires two steps:
Changing the Web Start cache locationA system properties file will need to be created which changes the location of the Web Start cache, and configuration file will need to be created which points to that system properties file. If it does not already exist, a file deployment.config needs to be created in the deployment system home. The deployment system home on Mac OS X is /System/Library/Frameworks/JavaVM.framework/Home/ and on Windows is in <Windows Directory>\Sun\Java\Deployment. The deployment.config file needs to set the location of a new file, deployment.properties. This properties file can be in the same folder as the deployment.config file. To set this location, the config must contain the line: deployment.system.config=file://path/to/deployment.properties An example deployment.config class may therefore be as follows: /System/Library/Frameworks/JavaVM.framework/Home/deployment.config deployment.system.config=file:///System/Library/Frameworks/JavaVM.framework/Home/deployment.properties The file deployment.properties should now be written the location specified, and should indicate the new desired location of the Java Web Start cache. To do this, it must contain the line: deployment.user.cachedir=/path/to/webstart/cache. An example deploy.properties class may therefore be as follows: /System/Library/Frameworks/JavaVM.framework/Home/deployment.properties deployment.user.cachedir=/System/Library/Caches/webstart TestingYou can test that this configuration change has been correctly applied by trying our Java Checker application, which you can run by clicking on http://jnlp.concord.org/dev/org/concord/maven-jnlp/java-checker/java-checker.jnlp. When this runs you should notice two things:
Ensuring that students have read/write permissions on the new folderIn order for students to be able to run the software and automatically update the software if new versions are released, the students need to have full permissions on the new Web Start cache folder. They not only need full permissions for all files and folders that may currently exist on the folder, but also for any files and folders that another user may create in the future. One way to grant these permissions would be to include a script as a login hook which automatically granted full permissions recursively on all files and folders in the cache folder. A second, possibly cleaner way, is to use ACLs (Access Control Lists), and set them up on the cache folder so that the permissions are inherited down to all sub folders. Using ACLsACLs have been available to Macs since OS X 10.4. ACLs need to be turned on before they can be used. To turn them on run: sudo /usr/sbin/fsaclctl -p / -e or, on Mac OS X Server, you can use the Workgroup Manager. We can apply ACLs so that users have all necessary permissions on the cache folder: First remove all existing ACLs: chmod -RN /path/to/webstart/cache Now setup the root ACL: chmod +a "some_group allow read,write,add_subdirectory,delete_child,search,delete,file_inherit,directory_inherit" /path/to/webstart/cache Now apply the rule to all the existing files: chmod -R +ai "some_group allow read,write,add_subdirectory,delete_child,search,delete,file_inherit,directory_inherit" /path/to/webstart/cache/* TestingTo see if ACLs applied the permissions as expected, check the permissions of the webstart cache, and then create a file and check the permissions on that file: e.g. $ ls -led /path/to/webstart/cache/ $ touch /path/to/webstart/cache/test You can also test this by running one version of Concord software as one member of some_group, and then running a different version of the software as another. The first user should be able to successfully write files to the cache location, and the second should be able to read those files and add new files. Two examples of software that could be used by two managed users are a UDL activity and an ITSI activity. The first application will add ~130 MB, and the second will add a few more MBs. |
Document generated by Confluence on Jan 27, 2014 16:52 |